<!doctype html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title>高德地图</title>
		<script>
			var _hmt = _hmt || []; (function() {
				var hm = document.createElement("script");
				hm.src = "https://hm.baidu.com/hm.js?bfe0f813e9140bcc7ca519ff5531be4a";
				var s = document.getElementsByTagName("script")[0];
				s.parentNode.insertBefore(hm, s);
			})();
		</script>
	</head>
	<style>
		body, div{ margin:0; padding:0; } 
		#map { width: 100%; height: 100%; top:0; position:absolute; }
		.amap-logo{ opacity: 0 !important;}
		.amap-copyright{opacity: 0 !important;}
		.amap-container{ background: none !important;}
	</style>
	<body>
		<div id="map">
		</div>
		<script type="text/javascript">
			window._AMapSecurityConfig = {
				securityJsCode: 'a5e92c3ec24380800ca61bca19897348'
			}
		</script>
		<script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=af22a24481c48d0f65c482e9c3f7ad3f">
		</script>
		<script>
			var loadState = 0;
			var cleanStyle = 'amap://styles/ab6beda2babedf765dca701de1708c79';
			var map = new AMap.Map("map", {
				mapStyle: cleanStyle,
				resizeEnable: true,
				showIndoorMap: false,
				indoorMap: false,
				features:['road'],
				zoom: 17
			});
			map.on('complete', function(e){
				loadState++;
			});
			map.on('moveend', function(e){
				loadState++;
			});
			
			var trafficLayer = new AMap.TileLayer.Traffic({
				zooms: [10, 18]
			});
			trafficLayer.setMap(map);
			trafficLayer.on('complete', function(e){
				loadState++;
			});
			
			function setCenter(lng, lat){
				if(lng == undefined || lng == null || lng == 0
					|| lat == undefined || lat == null || lat == 0) {
					return;
				}
				
				map.setCenter([lng, lat]);
			}
			
			function setZoom(zoom) {
				if(zoom == undefined || zoom == null || zoom == 0) {
					return;
				}
				
				map.setZoom(zoom);
			}
			
			function setZoomAndCenter(zoom, lng, lat) {
				if(zoom == undefined || zoom == null || zoom == 0
					|| lng == undefined || lng == null || lng == 0
					|| lat == undefined || lat == null || lat == 0) {
					return;
				}
				
				map.setZoomAndCenter(zoom, [lng, lat]);
			}
			
			function getLoadState() {
				return loadState;
			}
		</script>
	</body>
</html>